package com.xzy.service.impl;

import com.xzy.dao.TechMapper;
import com.xzy.entity.Tech;
import com.xzy.service.TechService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TechServiceImpl implements TechService {
   @Autowired
   private TechMapper techMapper;
    @Override
    public void addTech(Tech tech) {
        techMapper.addTech(tech);
    }

    @Override
    public Tech getTech(int techId) {
        return techMapper.getTech(techId);
    }

    @Override
    public void updateTech(Tech tech) {
          techMapper.updateTech(tech);
    }

    @Override
    public void deleteTech(int techId) {
        techMapper.deleteTech(techId);
    }

    @Override
    public List<Tech> getTechByType(String techType) {
        return techMapper.getTechByType(techType);
    }

    @Override
    public List<Tech> findAll() {
        return techMapper.findAll();
    }
}
